#pragma once
#include <string>
#include <iostream>
using namespace std;
class myString
{
public:
	myString(const char *str = 0);					//构造
	myString(const myString& str);					//拷贝构造
	myString& operator=(const myString& str);		//重载=
	myString operator+(const myString& str) ;		//重载+
	myString& operator+=(const myString& str) ;		//重载+=
	bool operator==(const myString& str) const;		//重载==
	char& operator[](int index);					//重载[]
	
	~myString();									//析构
	//friend istream& operator >> (istream &is, myString &str);//输入
	friend ostream& operator<<(ostream &os, const myString &str);//输出
private:
	char *m_data;
};


